    ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) {
        if(list1==nullptr){
            return list2;
        }
        else{
            return list1;
        }
        ListNode* new_head=nullptr;

        if(list1->val<list2->val){
            new_head=list1;
            list1=list1->next;
        }
        else{
            new_head=list2;
            list2=list2->next;
        }
        new_head->next=mergeTwoLists(list1,list2);
        return new_head;
    }